﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SOA.DAL
{
    public class Preco
    {
        public SOA.MODEL.Preco Get()
        {
            var dt = new Db().Query("SELECT * FROM TB_PRECO");
            if (dt.Rows.Count == 0)
                return new MODEL.Preco();
            var p = new MODEL.Preco();
            p.HotDog1 = Convert.ToDecimal(dt.Rows[0]["PRECO_HOT_DOG_1"]);
            p.HotDog2 = Convert.ToDecimal(dt.Rows[0]["PRECO_HOT_DOG_2"]);
            p.Refri1 = Convert.ToDecimal(dt.Rows[0]["PRECO_REFRI_1"]);
            p.Refri2 = Convert.ToDecimal(dt.Rows[0]["PRECO_REFRI_2"]);
            return p;
        }
    }
}